Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix/s3 utils 148 mongodb improvements #300

Merged
merged 5 commits into from
Oct 27, 2023

Conversation

williamlardier
Copy link
Contributor

@williamlardier williamlardier commented Oct 11, 2023

  • bump mongodb driver by bumping arsenal version.
  • rework logging to display the mongodb reasons along with the error code.
  • add periodic logging to better track the progress of the job in case of problems.
  • migrate all code (including tests) to the latest mongodb changes (i.e. callbacks are removed and replaced by promises, cursors are not readable anymore by default).

@bert-e
Copy link
Contributor

bert-e commented Oct 11, 2023

Hello williamlardier,

My role is to assist you with the merge of this
pull request. Please type @bert-e help to get information
on this process, or consult the user documentation.

Status report is not available.

@scality scality deleted a comment from bert-e Oct 11, 2023
@bert-e
Copy link
Contributor

bert-e commented Oct 11, 2023

Request integration branches

Waiting for integration branch creation to be requested by the user.

To request integration branches, please comment on this pull request with the following command:

/create_integration_branches

Alternatively, the /approve and /create_pull_requests commands will automatically
create the integration branches.

@williamlardier williamlardier force-pushed the bugfix/S3UTILS-148-mongodb-improvements branch from d7a99a3 to 4c1926a Compare October 12, 2023 07:09
@williamlardier williamlardier marked this pull request as ready for review October 12, 2023 12:58
@williamlardier
Copy link
Contributor Author

/create_integration_branches

@bert-e
Copy link
Contributor

bert-e commented Oct 12, 2023

Integration data created

I have created the integration data for the additional destination branches.

The following branches will NOT be impacted:

  • development/1.4

You can set option create_pull_requests if you need me to create
integration pull requests in addition to integration branches, with:

@bert-e create_pull_requests

The following options are set: create_integration_branches

@bert-e
Copy link
Contributor

bert-e commented Oct 12, 2023

Waiting for approval

The following approvals are needed before I can proceed with the merge:

  • the author

  • 2 peers

The following options are set: create_integration_branches

@francoisferrand
Copy link
Contributor

  • this change is incomplete : there are other modules which use mongo in this component (e.g. CrrExistingObjects, DataReport, ...) and they must be migrated as well.
  • this is a significant/risky change: should be done on next branch only (which is not integrated yet, I think)

@williamlardier
Copy link
Contributor Author

williamlardier commented Oct 12, 2023

@francoisferrand : there is no mongodb-related function in other files as far as I can see. Please share example if you saw some. Usage of already migrated functions does not require any change, as callbacks are kept; we only need to change direct use of the MongoDB driver.

We also need this change for the current branch if we want to be able to support this parameter for Artesca 1.7, if we cannot bump arsenal, then we need to create (and maintain) an hotfix branch in Arsenal, for s3utils 1.13.

@francoisferrand
Copy link
Contributor

Indeed, I missed the fact we did not use mongo driver directly, but through arsenal which has been migrated!

We also need this change for the current branch if we want to be able to support this parameter for Artesca 1.7, if we cannot bump arsenal, then we need to create (and maintain) an hotfix branch in Arsenal, for s3utils 1.13.

It would be much better to merge on 1.14, and switch to s3utils 1.14 on Artesca : this way we keep the option to stick or revert to 1.13, and do not mix concerns.

As far as "product" is concerned, it should not matter that we make the change on 1.13 or 1.14 : they will get the same code either way.... but as far as "engineering" (and maintenance) is concerned, this is the safe way.

@williamlardier williamlardier changed the base branch from development/1.13 to development/1.14 October 13, 2023 13:39
@scality scality deleted a comment from bert-e Oct 16, 2023
Copy link
Contributor

@benzekrimaha benzekrimaha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

res => {
// Periodically display information about the cursor
// if more than 30s elapsed
if (Date.now() - startCursorDate > 30000) {
Copy link
Contributor

@francoisferrand francoisferrand Oct 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this will call each time the callback is called, once the 30 second liimit has been reached: need to reset startCursorDate when we add a log ?

Suggested change
if (Date.now() - startCursorDate > 30000) {
const currentDate = Date.now();
if (currentDate - startCursorDate >= 30000) {
startCursorDate = currentDate;

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 8f7df21

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@williamlardier williamlardier force-pushed the bugfix/S3UTILS-148-mongodb-improvements branch from 862a619 to 8f7df21 Compare October 25, 2023 10:02
@williamlardier williamlardier force-pushed the bugfix/S3UTILS-148-mongodb-improvements branch from 8f7df21 to abe7c14 Compare October 26, 2023 08:47
@scality scality deleted a comment from bert-e Oct 26, 2023
@williamlardier
Copy link
Contributor Author

/approve

@bert-e
Copy link
Contributor

bert-e commented Oct 27, 2023

In the queue

The changeset has received all authorizations and has been added to the
relevant queue(s). The queue(s) will be merged in the target development
branch(es) as soon as builds have passed.

The changeset will be merged in:

  • ✔️ development/1.14

The following branches will NOT be impacted:

  • development/1.13
  • development/1.4

There is no action required on your side. You will be notified here once
the changeset has been merged. In the unlikely event that the changeset
fails permanently on the queue, a member of the admin team will
contact you to help resolve the matter.

IMPORTANT

Please do not attempt to modify this pull request.

  • Any commit you add on the source branch will trigger a new cycle after the
    current queue is merged.
  • Any commit you add on one of the integration branches will be lost.

If you need this pull request to be removed from the queue, please contact a
member of the admin team now.

The following options are set: approve, create_integration_branches

@bert-e
Copy link
Contributor

bert-e commented Oct 27, 2023

I have successfully merged the changeset of this pull request
into targetted development branches:

  • ✔️ development/1.14

The following branches have NOT changed:

  • development/1.13
  • development/1.4

Please check the status of the associated issue S3UTILS-148.

Goodbye williamlardier.

@bert-e bert-e merged commit abe7c14 into development/1.14 Oct 27, 2023
12 checks passed
@bert-e bert-e deleted the bugfix/S3UTILS-148-mongodb-improvements branch October 27, 2023 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants